package household.household.service;

import java.util.List;

import household.household.dao.SettleHouseholdDAO;
import household.household.model.SettleHousehold;
import household.util.FlexigridForm;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("settleHouseholdService")
public class SettleHouseholdServiceImpl implements SettleHouseholdService{
	
	@Autowired
	public SettleHouseholdDAO settleHouseholdDAO;

	public int save(SettleHousehold model) {		
		return settleHouseholdDAO.save(model);
	}

	public SettleHousehold get(int id) {
		return settleHouseholdDAO.get(id);
	}

	public boolean delete(int id) {		
		return settleHouseholdDAO.delete(id);
	}

	public boolean update(SettleHousehold model) {
		return settleHouseholdDAO.update(model);
	}
	
	public List<SettleHousehold> getAll(){
		return settleHouseholdDAO.queryAll();
	}
	
	public List<SettleHousehold> getFromFlexigrid(FlexigridForm flexigridForm) {
		return settleHouseholdDAO.queryFromFlexigrid(flexigridForm);
	}
	
}
